/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package skipass;

/**
 *
 * @author andrii
 */
public class SkiWicket implements Wicket{
    
    private final SkiPassSystem skiPassSystem;

    public SkiWicket(SkiPassSystem skiPassSystem) {
        this.skiPassSystem = skiPassSystem;
    }

    @Override
    public boolean passing(Pass pass) {
        if (pass == null) return false;        
        return !skiPassSystem.passInBlockingList(pass) && pass.validate();
    }
    
}
